package demo5;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//@Controller
//@Service
//@Repository
@Component
public class Person {
    //@Autowired
//    @Resource(name = "sweater")
//    private Clothes clothes;
//    @Resource
//    private Clothes sweater;

    @Resource
    private Clothes shirt;

    public void play()
    {
//        clothes.wear();
//        sweater.wear();
        shirt.wear();
        System.out.println("出门玩耍");
    }
}
